package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.enums.BillTypeDyeGrey;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.DyeGreyMain;
import java.util.List;
import java.util.Optional;

/**
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2023-12-15 16:05:38
 */
public interface DyeGreyMainService {
    DyeGreyMain insert(DyeGreyMain record);

    DyeGreyMain insertSelective(DyeGreyMain record);

    List<DyeGreyMain> multiInsert(List<DyeGreyMain> list);

    int updateByPrimaryKey(DyeGreyMain record);

    int updateByPrimaryKeySelective(DyeGreyMain record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    DyeGreyMain selectByPrimaryKey(Integer id);
    // 根据主键作废
    int setVoid(Integer id);

    List<DyeGreyMain> selectAll();

    DyeGreyMain save(DyeGreyMain record);
    List<DyeGreyMain> multiSave(List<DyeGreyMain> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(DyeGreyMain record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default DyeGreyMain fullFill(DyeGreyMain record){
        return record;
    }

    default void doBeforeInsert(DyeGreyMain record){}
    default void doAfterInsert(DyeGreyMain record){}
    List<DyeGreyMain> selectByExample(Example<DyeGreyMain> example);
    DyeGreyMain moveBill(Integer id, String moveBillFlag);
    //=================以上是自动生成的代码，自定义代码请写在下面==================

    DyeGreyMain getNew8ClientSid(String clientSid, BillTypeDyeGrey billType);
}